import request from "@/utils/request";
import { AxiosPromise } from "axios";
import { listInfo, orderQuery, withdrawalQuery, withdList } from "./types";


/**
 * 订单接口
 */
export function postOrderList(data: orderQuery): AxiosPromise<PageResult<listInfo[]>> {
  return request({
    url: "/admin/order/pageList",
    method: "post",
    data
  });
}


/**
 * 提交确认收款
 */
export function confirmRecharge(data: any) {
  return request({
    url: "/admin/order/confirmRecharge",
    method: "post",
    data
  });
}


/**
 * 提现申请记录
 */
export function withdrawalList(data: withdrawalQuery): AxiosPromise<PageResult<withdList[]>> {
  return request({
    url: "/admin/member/withdrawalApply/pageList",
    method: "post",
    data
  });
}

/**
 * 提现操作
 */
export function handleApply(data: any) {
  return request({
    url: "/admin/member/withdrawalApply/handleApply",
    method: "post",
    data
  });
}

/**
 * 订单-已读
 */
export function orderRead(data: any) {
  return request({
    url: "/admin/order/read",
    method: "post",
    data
  });
}

/**
 * 申请记录-已读
 */
export function withdrawalApplyRead(data: any) {
  return request({
    url: "/admin/member/withdrawalApply/read",
    method: "post",
    data
  });
}